function format(source, params) {
    if (params.length > 0) {
        params.forEach((item, index) => {
            const a = new RegExp("\\{" + index + "\\}", "g")
            source = source.replace(a, item)
        })
    }
    return source;
};
const xxx = format("a{0}b{1}c", ["试一下", "我看行","我看行","我看行","我看行"]);
console.log(xxx)